<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>社区医疗管理系统</title>
    <link href="<%=path %>/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path %>/css/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="<%=path%>/js/jquery.min.js"></script>
    <script type="text/javascript" src="<%=path%>/js/jquery-ui.js"></script>
    <script type="text/javascript">
        $(function () {
            //setMenuHeight
            $("#modifyPassword").click(function () {
                $("#showModify").dialog({
                    title: '修改密码',
                    width: 430,
                    height: 230,
                    buttons: {
                        "确定": function () {
                        },
                        "取消": function () {
                            $(this).dialog('close');
                        }
                    }
                });
            });
            $('.menu').height($(window).height() - 51 - 27 - 26 - 5);
            $('.sidebar').height($(window).height() - 51 - 27 - 26 - 5);
            $('.page').height($(window).height() - 51 - 27 - 26 - 5);
            $('.page iframe').width($(window).width() - 15 - 168);
            //menu on and off
            $('.btn').click(function () {
                $('.menu').toggle();

                if ($(".menu").is(":hidden")) {
                    $('.page iframe').width($(window).width() - 15 + 5);
                } else {
                    $('.page iframe').width($(window).width() - 15 - 168);
                }
            });

            $('.subMenu a[href="#"]').click(function () {
                $(this).next('ul').toggle();
                return false;
            });
        });

    </script>
</head>
<body style="overflow-y:hidden">
<div id="wrap">
    <div id="header">
        <div class="logo fleft"></div>
        <div class="topright">
            <ul>
                <li><span><img src="<%=path %>/images/index-logout.png" class="helpimg" height="16" width="16"/></span><a
                        href="<%=basePath%>goOut">注销</a></li>
                <li><span><img src="<%=path %>/images/t07.png" class="helpimg" height="16" width="16"/></span><a
                        href="<%=path %>/html/userpwdupdate.jsp">修改密码</a></li>
            </ul>
        </div>
        <div class="clear"></div>
        <div class="subnav">
            <div class="subnavLeft fleft"></div>
            <div class="fleft"></div>
            <div class="subnavRight fright"></div>
        </div>
    </div><!--#header -->
    <div id="content">
        <div class="space"></div>
        <div class="menu fleft">
            <ul>
                <li class="subMenuTitle">菜单</li>
                <ul>
                    <c:if test="${user.role=='管理员'}">
                        <li><a href="<%=basePath%>findSomeUser" target="right">用户管理</a></li>
                        <li><a href="<%=basePath%>showSomeDrugs" target="right">药品信息管理</a></li>
                        <li><a href="<%=basePath%>findSomeDoctors" target="right">医生管理</a></li>
                        <li><a href="<%=basePath%>showAllDepartment" target="right">科室管理</a></li>
                        <li><a href="<%=basePath%>selectMember" target="right">会员管理</a></li><!-- 挂号人员独有 -->
                        <li><a href="<%=basePath%>findSomeRegisterorder" target="right">挂号管理</a></li>
                        <li><a href="<%=basePath%>findSomeDuty" target="right">医生值班管理</a></li>
                        <li><a href="<%=basePath%>findSomeAdvice" target="right">医生诊断管理</a></li>
                        <li><a href="<%=basePath%>findSomePaymentDetails" target="right">缴费明细查询</a></li>
                        <li><a href="<%=basePath%>findSomeCost" target="right">费用结算明细查询</a></li>
                    </c:if>
                    <c:if test="${user.role=='服务人员'}">
                        <li><a href="<%=basePath%>selectMember" target="right">会员管理</a></li><!-- 挂号人员独有 -->
                        <li><a href="<%=basePath%>findSomeRegisterorder" target="right">挂号管理</a></li>
                        <li><a href="<%=basePath%>findSomeCost" target="right">费用结算</a></li>
                    </c:if>
                    <c:if test="${user.role=='药剂师'}">
                        <li><a href="<%=basePath%>showSomeDrugs" target="right">药品信息管理</a></li>
                        <li><a href="<%=basePath%>showAllAdviceToMember" target="right">药品发放</a></li>
                    </c:if>
                    <c:if test="${user.role=='医生'}">
                        <li><a href="<%=basePath%>showDutyToDoctor" target="right">医生值班</a></li>
                        <li><a href="<%=basePath%>findSomeAdvice" target="right">医生诊断</a></li>
                    </c:if>
                    <c:if test="${user.role=='会员'}">
                        <li><a href="<%=path%>/html/ghadd.jsp" target="right">预约挂号</a></li>
                        <li><a href="<%=basePath%>findSomePaymentDetails" target="right">缴费明细查询</a></li>
                    </c:if>
                </ul>
            </ul>
        </div>
        <div class="sidebar fleft">
            <div class="btn"></div>
        </div>
        <div class="page">
            <iframe width="100%" scrolling="auto" height="100%" frameborder="false" allowtransparency="true"
                    style="border: medium none;" src="<%=path %>/html/main.jsp" id="rightMain" name="right"></iframe>
        </div>
    </div><!--#content -->
    <div class="clear"></div>
    <div id="footer">CopyRight &copy; 2017-2018</div><!--#footer -->
</div><!--#wrap -->
</body>
</html>
